package train48days;

import java.util.HashMap;

public class 判断子序列 {
    public boolean isSubsequence(String s, String t) {
        int n = s.length(),m=t.length();
        int i = 0, j =0;
        while (i<n&&j<m){
            if (s.charAt(i)==t.charAt(j)){
                i++;
            }
            j++;
        }
        if (i==n){
            return true;
        }else {
            return false;
        }
    }
}
